package com.springark.ms.sampleorders.api;

import com.springark.ms.commons.MsApiResult;
import com.springark.ms.commons.consts.SpringarkContentTypes;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hankchan
 * @since 2019/5/8
 */
@RestController
public class HealthAPIs {

    @GetMapping(value = "/health", produces = SpringarkContentTypes.APPLICATION_JSON)
    public MsApiResult health(
            @RequestHeader(value = "request_id", required = false) String requestId) {
        return MsApiResult.newInstance().success("Health Check", requestId);
    }
}
